<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.collection.TreeMap</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.collection.TreeMap");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791">tango.util.collection.TreeMap</a></h1>
                
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L42">TreeMap</a></span>
<script>explorer.outline.addDecl('TreeMap');</script>(K, T) : MapCollection!(K, T), SortedKeys!(K, T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">RedBlack Trees of &#40;key, element&#41; pairs
 
        </font><br><br>
<b>author:</b><br>Doug Lea
 @version 0.93<br><br> <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>RBPairT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L59">tree</a></span>
<script>explorer.outline.addDecl('tree');</script>; [package]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The root of the tree. Null if empty.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>ComparatorT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L65">cmp</a></span>
<script>explorer.outline.addDecl('cmp');</script>; [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The Comparator to use for ordering
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L72">this</a></span>
<script>explorer.outline.addDecl('this');</script>(); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using DefaultComparator for ordering
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L81">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">screener</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using given screener for screening elements &#40;not keys&#41;
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L89">this</a></span>
<script>explorer.outline.addDecl('this');</script>(ComparatorT <span class="funcparam">c</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using given Comparator for ordering
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L97">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">s</span>, ComparatorT <span class="funcparam">c</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using given screener and Comparator.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L106">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">s</span>, ComparatorT <span class="funcparam">c</span>, RBPairT <span class="funcparam">t</span>, int <span class="funcparam">n</span>); [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Special version of constructor needed by clone&#40;&#41;
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L124">compareKey</a></span>
<script>explorer.outline.addDecl('compareKey');</script>(K <span class="funcparam">fst</span>, K <span class="funcparam">snd</span>); [private, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The default key comparator</font><br><br>
<font color="black">@param fst first argument
 @param snd second argument
 </font><br><br>
<b>Returns:</b><br>
a negative number if fst is less than snd; a
 positive number if fst is greater than snd; else 0<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L142">compareElem</a></span>
<script>explorer.outline.addDecl('compareElem');</script>(T <span class="funcparam">fst</span>, T <span class="funcparam">snd</span>); [private, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The default element comparator</font><br><br>
<font color="black">@param fst first argument
 @param snd second argument
 </font><br><br>
<b>Returns:</b><br>
a negative number if fst is less than snd; a
 positive number if fst is greater than snd; else 0<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>TreeMap!(K, T) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L155">duplicate</a></span>
<script>explorer.outline.addDecl('duplicate');</script>(); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create an independent copy. Does not clone elements.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L171">contains</a></span>
<script>explorer.outline.addDecl('contains');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.contains
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.contains<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L183">instances</a></span>
<script>explorer.outline.addDecl('instances');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.instances
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.instances<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>GuardIterator!(T) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L195">elements</a></span>
<script>explorer.outline.addDecl('elements');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.elements
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.elements<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L209">opApply</a></span>
<script>explorer.outline.addDecl('opApply');</script>(int delegate (inout T value) <span class="funcparam">dg</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.model.View.View.opApply
                Time complexity: O&#40;n&#41;
                
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.model.View.View.opApply<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L225">opApply</a></span>
<script>explorer.outline.addDecl('opApply');</script>(int delegate (inout K key, inout T value) <span class="funcparam">dg</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.MapView.opApply
                Time complexity: O&#40;n&#41;
                
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.MapView.opApply<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>ComparatorT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L238">comparator</a></span>
<script>explorer.outline.addDecl('comparator');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.KeySortedCollection.comparator
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.KeySortedCollection.comparator<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L247">comparator</a></span>
<script>explorer.outline.addDecl('comparator');</script>(ComparatorT <span class="funcparam">c</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Use a new Comparator. Causes a reorganization
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L277">containsKey</a></span>
<script>explorer.outline.addDecl('containsKey');</script>(K <span class="funcparam">key</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.containsKey.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.containsKey<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L289">containsPair</a></span>
<script>explorer.outline.addDecl('containsPair');</script>(K <span class="funcparam">key</span>, T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.containsPair.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.containsPair<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>PairIterator!(K, T) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L301">keys</a></span>
<script>explorer.outline.addDecl('keys');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.keys.
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.keys<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>T <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L311">get</a></span>
<script>explorer.outline.addDecl('get');</script>(K <span class="funcparam">key</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.get.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.get<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L328">get</a></span>
<script>explorer.outline.addDecl('get');</script>(K <span class="funcparam">key</span>, inout T <span class="funcparam">value</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the element associated with Key key. 
 @param key a key
 </font><br><br>
<b>Returns:</b><br>
whether the key is contained or not<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L349">keyOf</a></span>
<script>explorer.outline.addDecl('keyOf');</script>(inout K <span class="funcparam">key</span>, T <span class="funcparam">value</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.keyOf.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.keyOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L370">clear</a></span>
<script>explorer.outline.addDecl('clear');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.clear.
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.clear<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L382">removeAll</a></span>
<script>explorer.outline.addDecl('removeAll');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeAll.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeAll<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L403">remove</a></span>
<script>explorer.outline.addDecl('remove');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeOneOf.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeOneOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L422">replace</a></span>
<script>explorer.outline.addDecl('replace');</script>(T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.replaceOneOf.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.replaceOneOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L441">replaceAll</a></span>
<script>explorer.outline.addDecl('replaceAll');</script>(T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.replaceAllOf.
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.replaceAllOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>T <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L459">take</a></span>
<script>explorer.outline.addDecl('take');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.take.
 Time complexity: O&#40;log n&#41;.
 Takes the element associated with the least key.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.take<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L482">add</a></span>
<script>explorer.outline.addDecl('add');</script>(K <span class="funcparam">key</span>, T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.MapCollection.MapCollection.add.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.MapCollection.MapCollection.add<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L493">removeKey</a></span>
<script>explorer.outline.addDecl('removeKey');</script>(K <span class="funcparam">key</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.MapCollection.MapCollection.remove.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.MapCollection.MapCollection.remove<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L512">replacePair</a></span>
<script>explorer.outline.addDecl('replacePair');</script>(K <span class="funcparam">key</span>, T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.MapCollection.MapCollection.replaceElement.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.MapCollection.MapCollection.replaceElement<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L589">checkImplementation</a></span>
<script>explorer.outline.addDecl('checkImplementation');</script>(); [public, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.model.View.View.checkImplementation.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.model.View.View.checkImplementation<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeMap.d?rev=3791#L620">MapIterator</a></span>
<script>explorer.outline.addDecl('MapIterator');</script>(K, V) : AbstractMapIterator!(K, V);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">opApply&#40;&#41; has migrated here to mitigate the virtual call
                on method get&#40;&#41;
                
</font><br><br>
</dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                         :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sat Aug  2 16:08:32 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>